<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Progressive Play Server
 * Extends the array helper
 * /helpers/MY_array_helper.php
 * By: Yukwunhang
 */
/**
 * Change the matching array key to a new one. 
 * @return new array with new array keys.
 * @param object $orig
 * @param object $new
 * @param object $array
 */
function array_change_key_name( $orig, $new, &$array )
{
    foreach ( $array as $k => $v )
        $return[ $k === $orig ? $new : $k ] = ( is_array( $v ) ? array_change_key_name( $orig, $new, $v ) : $v );
    return $return;
}
/*
 * End of file
 */